﻿using HupunSDK.Core;
using HupunSDK_API.Models;
using HupunSDK_API.Response;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;

namespace HupunSDK_API.Request
{
    public class CommitExceptionRequest : BaseRequest<HupunCommitExceptionResponse>
    {
        [JsonProperty("request")]
        public CommitExceptionModel Request { get; set; }

        public override string GetApiName() => "/erp/opentrade/trade/exception/commit";

        public override HttpMethod GetHttpMethod() => HttpMethod.Post;
    }

    public class CommitExceptionModel
    {
        [JsonProperty("billCodes")]
        public List<string> BillCodes { get; set; }

        [JsonProperty("exception_name")]
        public string ExceptionName { get; set; }

        [JsonProperty("commit_type")]
        public int CommitType { get; set; }

        [JsonProperty("remark")]
        public string Remark { get; set; }
    }
}
